package com.zmn.oms.services.interfaces.orderpay;

import com.zmn.account.common.dto.account.AccountInfoDRO;
import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.entity.factory.OrderFactory;

/**
 * 类描述：资金帐号支付
 *
 * @author heciqi
 * @date 2020/10/20 17:05
 */
public interface AccountPayBService {
	/**
	 * 检测余额
	 *
	 * @param orderId
	 * @param payAmount
	 */
	void checkAccount(Long orderId, Integer payAmount) throws OmsBaseException;

	/**
	 * 检测余额
	 * @param factoryId
	 * @param payAmount
	 */
	void checkAccount(Integer factoryId, Integer payAmount) throws OmsBaseException;

	/**
	 * 根据订单id获取资金账户
	 *
	 * @param orderFactory
	 * @return
	 */
	AccountInfoDRO getAccountInfoByOrderId(OrderFactory orderFactory);

	/**
	 * 获取资金帐号支付渠道
	 *
	 * @param orderId
	 * @return
	 */
	Integer getPayChannelIdByOrderId(Long orderId);

	/**
	 * 获取资金帐号支付渠道
	 *
	 * @param factoryId
	 * @return
	 */
	Integer getPayChannelIdByFactoryId(Integer factoryId);
}
